package cn.wolfcode.web.controller;

import cn.wolfcode.service.IBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author admin
 * @program: car-business
 * @description: 首页
 * @date 2021-01-12 22:59:25
 */
@Controller
public class IndexController {
    @Autowired
    private IBusinessService businessService;
    @RequestMapping("/index")
    public  String index(Model model,String mainStore){
        model.addAttribute("business",businessService.selectByMainStore(mainStore));
        model.addAttribute("businesses",businessService.listAll());
        return "index";

    }
}
